﻿using DtoFw.Enum;
using System;

namespace Domain.Base
{
    public class BizException: Exception
    {
        public EnumReturnCode? ErrorType;
        public string Msg;
        public Exception Exception;

        public BizException() : base()
        { }

        public BizException(string message) : base(message)
        {
            Msg = message;
        }

        public BizException(string message, Exception innerException) : base(message, innerException)
        {
            Msg = message;
            Exception = innerException;
        }

        public BizException(EnumReturnCode errorType)
        {
            ErrorType = errorType;
        }

        public BizException(EnumReturnCode errorType, string message)
        {
            ErrorType = errorType;
            Msg = message;
        }

        public BizException(EnumReturnCode errorType, string message, Exception innerException)
        {
            ErrorType = errorType;
            Msg = message;
            Exception = innerException;
        }
    }
}
